/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx.exam;

import java.util.Arrays;

/**
 * <p>Project: javase - Ex1
 * <p>Powered by webrx On 2021-12-10 09:09:10
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex1 {
    public static void main(String[] args) {
        //将字符类型的ascii 是个整数
        int i = 'c';
        System.out.println(i);

        i = '中';
        System.out.println(i);
        //字符串对象的.toCharArray() 方法是将自己转换并返回char数组
        char[] cs = "hello".toCharArray();
        System.out.println(Arrays.toString(cs));
        int[] cc = new int[cs.length];
        for (int c = 0; c < cc.length; c++) cc[c] = cs[c];
        System.out.println(Arrays.toString(cc));
    }
}
